SAN DIEGO — Senator Dianne Feinstein suffered a setback in her effort to win a sixth term representing California as the state Democratic Party declined this weekend to endorse her re-election bid.

Ms. Feinstein is way ahead in most polls, and has a huge fund-raising advantage over her main opponent, Kevin de León, the California State Senate’s Democratic leader. Still, the vote here, at a raucous and well-attended party convention, is the latest indication of disenchantment with Feinstein, 84, among the party’s grass-roots advocates.

A candidate must garner the support of 60 percent of the delegates to win the party’s nomination. None of the candidates running for statewide election met that threshold.

Still, Ms. Feinstein’s showing was particularly stark given her status as a Democratic institution. Mr. de León drew 54 percent of the vote, or 1,508 votes, compared with 37 percent, or 1,023 votes, for Ms. Feinstein.

The vote came after Mr. de León, who has been running an insurgent campaign, delivered a blistering speech that reflects deep divisions among Democrats here — and across the nation — about how to respond to President Trump. Mr. de León questioned, among other things, remarks Ms. Feinstein had made that were interpreted by many Democratic activists here as sympathetic to Mr. Trump, and suggested she was too conventional in taking on the White House.

“The days of Democrats biding our time, biting our tongue, and triangulating at the margins are over,” he said.

His speech also reflected a feeling among many Democrats, particularly younger ones, that it is time for the old guard of Democratic leaders here to step aside. Gov. Jerry Brown, 79, is stepping down at the end of the year because of term limits.

“California’s greatness comes from acts of human audacity, not congressional seniority,” Mr. de León said.

Ms. Feinstein, in her remarks, talked about her success in the Senate in pushing through a ban on assault weapons, which was later phased out. She pledged to do it again if elected. But the pledge was clearly not enough.

Throughout her career, including when she served as mayor of San Francisco, Ms. Feinstein has been more of a centrist and has struggled for support in the most liberal wing of the party. Still, for all her difficulties, she has appeared to be in a dominant position leading into the June 5 primary with Mr. de León. A poll by the Public Policy Institute of California this month found her leading Mr. de León by a margin of 46 percent to 17 percent.

The vote took place Saturday evening and was counted overnight as party leaders took care, in tabulating the results, to avoid the chaos and challenges that came after the election of Eric C. Bauman as party leader in the face of a challenge from the party’s insurgent wing.

On Sunday morning, Mr. de León hailed the vote as “an astounding rejection of politics as usual.”

“California Democrats are hungry for new leadership that will fight for California values from the front lines, not equivocate on the sidelines,” he said.

The immediate reaction from Ms. Feinstein was to snarl and promise to steal more taxpayer cash before she becomes too much more senile